﻿using LxCore;

namespace LxCore
{
    public class StopRuleBase : JsObject
    {
        private bool _IsLogicOr = true;
        public bool IsLogicOr
        {
            get { return _IsLogicOr; }
            set { _IsLogicOr = value; RaisePropertyChanged(nameof(IsLogicOr)); }
        }
        public virtual bool IsStop()
        {
            throw new NotImplementedException();
        }
        public override void FromJsonKV(string key, IJsonReader jsReader)
        {
            switch (key)
            {
                case nameof(IsLogicOr): IsLogicOr = jsReader.ReadBool(); break;
                default: base.FromJsonKV(key, jsReader); break;
            }
        }
        public override void ToJsonKV(IJsonWriter jsWriter)
        {
            base.ToJsonKV(jsWriter);
            jsWriter.WriteBool(nameof(IsLogicOr), IsLogicOr);
        }
    }
}
